#if 0

#include "Skiplist.h"
#include <iostream>

using namespace DBServer::Database;

int main() {
    Skiplist<int> *skiplist = new Skiplist<int>();
    double score = 1.0;
    for (int i = 0; i < 15; i += 2)
    {
        score += 10.0;
        skiplist->insert(i, score);
    }
    skiplist->print();

    printf("erase : \n");
    int data = 0;
    skiplist->erase(data, 11.0);
    skiplist->print();

    data = 14;
    skiplist->erase(data, 81.0);
    skiplist->print();

    printf("--------------------------------\n");
    printf("get_score_first_in_range\n");
    std::shared_ptr<Return<int>> p1 = skiplist->get_score_first_in_range(50, 80);
    std::cout << "p1->score : \t" << p1->score << std::endl;
    std::cout << "p1->data  : \t" << p1->data << std::endl;

    printf("------------------------------\n");
    printf("get_score_last_in_range\n");
    std::shared_ptr<Return<int>> p2 = skiplist->get_score_last_in_range(50, 80);
    std::cout << "p2->score : \t" << p2->score << std::endl;
    std::cout << "p2->data  : \t" << p2->data << std::endl;

    printf("------------------------------\n");
    printf("get_location\n");
    int __i = 8;
    int location = skiplist->get_location(__i, 51);
    std::cout << "the index of (data = 8, score = 51) -> \t " << location << std::endl;
    skiplist->print();

    printf("-------------------------------\n");
    printf("get_element_by_rank\n");
    std::shared_ptr<Return<int>> p3 = skiplist->get_element_by_rank(3);
    std::cout << "p3->score : \t" << p3->score << std::endl;
    std::cout << "p3->data  : \t" << p3->data << std::endl;

    printf("----------------------------------\n");
    printf("is_in_range\n");
    bool res = skiplist->is_in_range(48, 49);
    std::cout << res << std::endl;
    skiplist->print();

    printf("----------------------------------\n");
    printf("erase_range_by_score\n");
    skiplist->print();
    int erase_num1 = skiplist->erase_range_by_score(10, 44);
    printf("++++++++++++++++++++++++++++++++++++++++\n");
    skiplist->print();

    printf("------------------------------------\n");
    printf("erase_range_by_rank\n");
    skiplist->print();
    int erase_num2 = skiplist->erase_range_by_rank(2,6);
    skiplist->print();
    
}


#endif